<?php
		if($pro_list->num_rows() > 0){
			foreach($pro_list->result() as $rows){
				
			
		?>
	<h4 class="d_h4">Product Details</h4>
    <div class="cleaner h20"></div>
            <div class="col col_img">

            <img style="width:240px; height: 250px; border: 2px solid #ccc;" src="<?php echo site_url(); ?>assets/uploads/original/<?php echo $rows->pro_img; ?>" alt="Image 10" />
            </div>
            <div class="col col_img no_margin_right">
                <table>
                	<tr>
                    	<td height="30">Category:</td>
                        <td><a style="font-weight:bolder;"><?php echo $rows->cate_name; ?></a></td>
                        
                    </tr>
                    <tr>
                    	<td height="30">Name:</td>
                        <td><?php echo $rows->pro_name; ?></td>
                        
                    </tr>
                    	<td height="30" width="160">Price:</td>
                        <td><?php echo $rows->pro_price; ?></td>
                    <tr>
                        
                    </tr>
                    <tr>
                    	<td height="30">Type version:</td>
                        <td><?php echo $rows->pro_type; ?></td>
                        
                    </tr>
                    <tr>
                        <td height="30">Posted on:</td>
                        <td><?php echo $rows->pro_date; ?></td>
                    </tr>
                    <tr>
                    	<td height="30">Warranty:</td>
                    	<td>1 Years</td>
                    </tr>
                </table>
                <div class="cleaner h20"></div>
                
			</div>
            <div class="cleaner h30"></div>
            
            <h5><strong>Product Description</strong></h5>
            <p><?php echo $rows->pro_description; ?></p>	
            
            <div class="cleaner h50"></div>
            
            <h4 class="d_h4">Member Detail</h4>
                <div class="cleaner h20"></div>
                <div class="col col_img">
           			 <img style="width:160px; height:150px; border: 2px solid #ccc;" src="<?php echo site_url(); ?>assets/uploads/users/<?php echo $rows->user_img; ?>" alt="Image 10" />
           		</div>
                <div class="col col_img no_margin_right">
                <table>
                    <tr>
                    	<td height="30">Name:</td>
                        <td><?php echo $rows->user_fullName; ?></td>
                        
                    </tr>
                    	<td height="30" width="160">Tel:</td>
                        <td><?php echo $rows->user_phone; ?></td>
                    <tr>
                        
                    </tr>
                    <tr>
                    	<td height="30">Email:</td>
                        <td><?php echo $rows->user_email; ?></td>
                        
                    </tr>
                    <tr>
                        <td height="30">Address:</td>
                        <td><?php echo $rows->user_address; ?></td>
                    </tr>
                   
                </table>
                </div>
                <div class="cleaner h20"></div>

                <!--Starting comment-->
                 <?php  
				  echo '
                    <div id="comment" style="float:left;">';
					if($this->session->userdata('id')){
					  
                    echo '<span style="color:red;">' . validation_errors() . '</span>';
                    ?><br />


                      <?php echo form_open('pages/comment/'.$this->uri->segment(3));?> <?php echo '
					  <strong>Comment</strong>';?>
                      <br />
                      <?php
                         
                         $post_btn=array(
                                         'type'=>'submit',
                                         'name'=>'btnpost',
                                         'value'=>'Post Comment'
                                         );
                      ?>
                      <textarea cols="24" rows="3" name="text" required></textarea>
                      <br />
                      <?php
                         echo form_submit($post_btn);
                         echo form_close();
                         
					}else{
						echo '<p>&nbsp;</p>';
						echo '<h3>Comment Here :</h3>'.anchor('pages/news','Click Here To Login');	
					}
                         ?>
                    
                <?php
            }
        }
        ?>
        
        <!--comment showing--->
        
        <!--end of comment showing pro_com-->
                <!--end of my comment-->
                <div class="cleaner h10"></div>
             
			</div>
            <div class="cleaner h30"></div>
            
            <div class="cleaner"></div>
            <?php
		if($pro_com->num_rows() > 0){
			foreach($pro_com->result() as $rows){
				
			
			?>
            <h5><strong> Comments about &quot; <?php echo $rows->pro_description; ?> &quot;</strong></h5>
            
            
            <div class="pro_d_com">
                 
                 <span class="com_p">Post by: <a href="kimsong"><?php echo $rows->user_fullName; ?></a></span><br />
                  <span class="com_p">Post on: <?php echo $rows->com_date; ?></span>
                <p style="border-bottom: 1px solid #CCCCCC; padding-bottom:5px;"><?php echo $rows->com_desc; ?></p>
            </div>
            
         <?php
				}
			}
		 ?>